package com.foreknow.view;

import com.foreknow.model.Hello;
import com.foreknow.service.HelloService;
import com.foreknow.service.impl.HelloServiceImpl;

import java.util.List;

public class HelloTest {
    public static void main(String[] args) {
        HelloService helloService = new HelloServiceImpl();

//        List<Object>list =helloService.add();
//        for (int i = 0; i<list.size();i++){
//            Hello add = (Hello) list.get(i);
//            System.out.println(add.getId() + "    "+add.getName()+"    "+add.getAge());
//        }
//
//       Hello hello = helloService.query(1);
//        System.out.println(hello.getId() + "    "+hello.getName()+"    "+"   ");

        Hello hello = new Hello();
        hello.setName("name");
        hello.setAge("2");
        hello.setId(1);
        boolean update =helloService.update(hello);
                if (update){
            System.out.println("ok");

        }else {
            System.out.println("no");
        }
    }
}
